package cn.bone.gateway.bean;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;

import java.util.Date;

/**
 * Created by superbone on 2017/3/28.
 * 用户访问记录
 */
@Entity("accessRecord")
public class AccessRecord {

    @Id
    private String id;
    private String host;        //访问ip
    private String from;        //访问类型(ios,android,phpWeb,javaWeb)
    private Date createTime;    //访问时间
    private String method;      //访问接口
    private String params;      //访问参数
    private String deviceId;    //设备编号
    private Integer timeConsume;//访问耗时毫秒数
    private Integer userId;     //调用者id
    private Integer resultCode; //返回状态值

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public Integer getTimeConsume() {
        return timeConsume;
    }

    public void setTimeConsume(Integer timeConsume) {
        this.timeConsume = timeConsume;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getResultCode() {
        return resultCode;
    }

    public void setResultCode(Integer resultCode) {
        this.resultCode = resultCode;
    }
}
